Class symantec.itools.db.beans.dbnav.model.TreeNodeComposite
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.db.beans.dbnav.model.TreeNodeComposite

Object
   |
   +----TreeNodeComponent
           |
           +----symantec.itools.db.beans.dbnav.model.TreeNodeComposite

public class TreeNodeComposite
extends TreeNodeComponent

This class represents the Composite from the Composite design pattern

The other participants in Composite pattern are: TreeNodeComponent - the Component TreeNodeLeaf - the Leaf TreeNodeBuilder - the Client

Version:
1.0 06/13/98
Author:
Hristo Tonev

Constructor Index

 o symantec.itools.db.beans.dbnav.model.TreeNodeComposite()
Default constructor
 o symantec.itools.db.beans.dbnav.model.TreeNodeComposite(DataItem)
Constructor to be used ONLY for the root node

Method Index

 o addChild(TreeNodeComponent)
This method makes sence only for the composite object
 o children()
Returns the children of the reciever as an Enumeration.
 o getAllowsChildren()
Returns true if the receiver allows children.
 o getChildAt(int)
Returns the child TreeNode at index childIndex.
 o getChildCount()
Returns the number of children TreeNodes the receiver contains.
 o getIndex(TreeNode)
Returns the index of node in the receivers children.
 o isLeaf()
Returns true if the receiver is a leaf.
 o removeChild(TreeNodeComponent)
This method makes sence only for the composite object

Constructors

 o TreeNodeComposite
public TreeNodeComposite()
Default constructor

 o TreeNodeComposite
public TreeNodeComposite(DataItem dataItem)
Constructor to be used ONLY for the root node

Methods

 o addChild
public void addChild(TreeNodeComponent child)
This method makes sence only for the composite object

Overrides:
addChild in class TreeNodeComponent
 o children
public java.util.Enumeration children()
Returns the children of the reciever as an Enumeration.

Overrides:
children in class TreeNodeComponent
 o getAllowsChildren
public boolean getAllowsChildren()
Returns true if the receiver allows children.

Overrides:
getAllowsChildren in class TreeNodeComponent
 o getChildAt
public com.sun.java.swing.tree.TreeNode getChildAt(int childIndex)
Returns the child TreeNode at index childIndex.

Overrides:
getChildAt in class TreeNodeComponent
 o getChildCount
public int getChildCount()
Returns the number of children TreeNodes the receiver contains.

Overrides:
getChildCount in class TreeNodeComponent
 o getIndex
public int getIndex(TreeNode node)
Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.

Overrides:
getIndex in class TreeNodeComponent
 o isLeaf
public boolean isLeaf()
Returns true if the receiver is a leaf.

Overrides:
isLeaf in class TreeNodeComponent
 o removeChild
public void removeChild(TreeNodeComponent child)
This method makes sence only for the composite object

Overrides:
removeChild in class TreeNodeComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index